<template>
    <div>
        <el-popover effect="light"
                    placement="right">
            <template #reference>
                <el-input v-model="input" placeholder="请输入表达式" @input="calculate" />
            </template>
            {{ result }}
        </el-popover>
    </div>
</template>
<script>
    export default {
        data() {
            return {
                input: '',
                result: '',
                intervalId: 0
            }
        },
        methods: {
            calculate() {
                this.result = window.calculateExpression(this.input)
            }
        }
    }
</script>
